package com.bestv.engine.filter;

import com.bestv.engine.model.RecommendationItem;
import com.bestv.lucene.ProgramSearcher;

/**
 * Created by Henry on 14-6-24.
 */
public class TagsFilter implements Filter {
    private String tags;

    public TagsFilter(String tags) {
        this.tags = tags;
    }

    @Override
    public boolean accept(RecommendationItem item) {
        ProgramSearcher searcher = new ProgramSearcher();
        return searcher.similarity(item.getId(), tags) > 0;
    }
}
